package com.itheima.health.controller;

import com.itheima.health.common.R;
import com.itheima.health.entity.CheckItem;
import com.itheima.health.entity.Checkgroup;
import com.itheima.health.service.CheckgroupService;
import com.itheima.health.service.CheckuItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/checkgroup")

public class CheckgroupController {


    @Autowired
    private CheckgroupService checkgroupService;
    /*
     * 新增
     * */
    @PostMapping
    public R<String> save(@RequestBody Checkgroup checkgroup) {
        System.out.println(checkgroup);
        checkgroupService.save(checkgroup);
        return R.success("添加成功");
    }
}
